import SMERouter from 'sme-router';
import axios from 'axios'//引入axios，用来发送ajax请求

import adminListRoute from '$r/adminList';
import advListRoute from '$r/advList';
import loginRoute from '$r/login';
import advRoute from '$r/adv';








//实例化路由器对象,并且传入一级路由的作用区域(是一个id)
//默认是hash路由模式 访问如下:http://XX.xX.XX.xx:XXXX/#/login
//如果要配置history路由模式,可以添加第二个参数"html5" 此外还需要服务端的配合
const router =new SMERouter('app','html5')
window.router = router
//配置路由
router.route('/login',loginRoute)
//一级路由配置
router.route("/adv", advRoute)

//二级路由配置
router.route("/adv/adminList",adminListRoute )
router.route("/adv/advList", advListRoute)

